from typing import Dict, Union, Tuple

from model.action import Action


class Reward:
    """
    写奖励函数，
    需要奖励的状态：
    需要奖励的动作：
    定义三种奖励函数：F phi,I^{=t},C^{<=}
    """

    def __init__(self, name: str, state_reward: Dict[Union[str, Tuple[str, str], float]],
                 action_reward:Dict[Action, float]):
        self.name = name
        self.state_reward = state_reward
        self.action_reward = action_reward

    def I(self, t: float):
        pass


    def C(self, t: float):
        return self.state_reward[t]

    def F(self, phi: str):
        return self.state_reward[phi]


